.authContainer {
  position: relative;
  width: 100%;
  height: 600px;
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.authInner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.authContainer.loginActive .authInner {
  transform: rotateY(0deg);
}

.authContainer.signInActive .authInner {
  transform: rotateY(180deg);
}


.loginCard,
.signInCard {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  backface-visibility: hidden;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 正面 */
.loginCard {
  transform: rotateY(0deg);
}

/* 背面 */
.signInCard {
  transform: rotateY(180deg);
}

/* 切换按钮的悬停效果 */
.loginCard button:hover,
.signInCard button:hover {
  transform: translateY(-1px);
  transition: transform 0.2s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .authContainer {
    padding: 0.5rem;
  }
  
  .authWrapper {
    height: 550px;
    max-width: 400px;
  }
  
  .loginCard,
  .signInCard {
    padding: 2rem;
  }
}

/* 加载状态时的样式 */
.loginCard.loading,
.signInCard.loading {
  pointer-events: none;
  opacity: 0.8;
}

.loginCard.switching,
.signInCard.switching {
  transition: opacity 0.3s ease, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


.authContainer.signInActive::before,
.authContainer.loginActive::before {
  opacity: 0.3;
  animation: glow 0.8s ease-in-out;
}

@keyframes glow {
  0% { opacity: 0; }
  50% { opacity: 0.6; }
  100% { opacity: 0.3; }
}

.authCard .loginContainer,
.authCard .signinContainer {
  transform: rotateY(0deg);
  backface-visibility: visible;
}

.authContainer {
  will-change: transform;
}

.loginCard,
.signInCard {
  will-change: transform, opacity;
}